package online.shenme.day08_self;

public class ColeEmployeetest {
    public static void main(String[] args) {

    }

}

 class ColeEmployee {
    private String name;
    private int birthday;


    public ColeEmployee() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getBirthday() {
        return birthday;
    }

    public void setBirthday(int birthday) {
        this.birthday = birthday;
    }

    public ColeEmployee(String name, int birthday) {
        this.name = name;
        this.birthday = birthday;
    }

}

class SalariedEmployee extends ColeEmployee {
    private double salary;

    public double salary() {
        return salary;
    }

    public double getSalary() {
        return salary;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public SalariedEmployee(String name, int birthday, double salary) {
        super(name, birthday);
        this.salary = salary;

    }
}

class HourlyEmployee extends ColeEmployee {
    private double hourlySalary;
    private int hours;


    public double salary() {
        double salary;
        if (hours <= 160) {
            salary = hourlySalary * hours;
        } else {
            salary = hourlySalary * 160 + hourlySalary * 1.5 * (hours - 160);
        }
        return salary;
    }

    public HourlyEmployee(String name, int birthday, double hourlySalary, int hours) {
        super(name, birthday);
        this.hourlySalary = hourlySalary;
        this.hours = hours;
    }

    public double getHourlySalary() {
        return hourlySalary;
    }

    public void setHourlySalary(double hourlySalary) {
        this.hourlySalary = hourlySalary;
    }

    public int getHours() {
        return hours;
    }

    public void setHours(int hours) {
        this.hours = hours;
    }
}

class SalesEmployee extends ColeEmployee {
    private double monthIncome;
    private double percentage;


    public double salary() {
        return monthIncome * percentage;
    }

    public SalesEmployee(String name, int birthday, double monthIncome, double percentage) {
        super(name, birthday);
        this.monthIncome = monthIncome;
        this.percentage = percentage;
    }

    public double getMonthIncome() {
        return monthIncome;
    }

    public void setMonthIncome(double monthIncome) {
        this.monthIncome = monthIncome;
    }

    public double getPercentage() {
        return percentage;
    }

    public void setPercentage(double percentage) {
        this.percentage = percentage;
    }
}

class Company {

}